package com.eclink.asset.asset.controller;

import com.eclink.asset.asset.domain.dao.AssetRepair;
import com.eclink.asset.asset.service.AssetRepairService;
import com.ruoyi.common.core.controller.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * 资产维修
 *
 * @author chenshixian
 * @date 2024-09-01
 */
@Api(tags ="资产维修的接口")
@RestController
@RequestMapping("/asset/repair")
public class AssetRepairController extends BaseController {

    @Resource
    private AssetRepairService assetRepairService;

    @ApiOperation("完成维修")
    @PostMapping("/finish/{applyId}")
    public ResponseEntity<Integer> finish(@PathVariable String applyId, @RequestBody AssetRepair repair) {

        assetRepairService.finish(applyId, repair);

        return ResponseEntity.ok(1);
    }


}
